home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_tem_ambhutcon.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  74 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEM_AmbHutCon.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message        entered
  13.     message     pulse
  14.  
  15.     thing        soundPos0        nolink
  16.     thing        soundPos1        nolink
  17.     thing        soundPos2        nolink
  18.     thing        soundPos3        nolink
  19.     thing        soundPos4        nolink
  20.     thing        soundPos5        nolink
  21.     thing        soundPos6        nolink
  22.     thing        soundPos7        nolink
  23.     thing        soundPos8        nolink
  24.     
  25.     sector      start_Amb1      linkID=1
  26.     sector      start_Amb2      linkID=1
  27.     sector      start_Amb3      linkID=1
  28.     
  29.     sector      stop_Amb1       linkID=0
  30.     sector      stop_Amb2       linkID=0
  31.     sector      stop_Amb3       linkID=0
  32.  
  33.     sound        ambient0=gen_cave_a1.wav   local
  34.     sound        ambient1=gen_cave_a2.wav   local
  35.     sound        ambient2=gen_cave_a3.wav   local
  36.     sound        ambient3=gen_cave_a4.wav   local
  37.     sound        ambient4=gen_cave_a5.wav   local
  38.     sound        ambient5=gen_cave_a6.wav   local
  39.     
  40.     int         soundsOn=0  local
  41.     
  42. end
  43.  
  44. # ========================================================================================
  45.  
  46. code
  47.  
  48. entered:
  49.  
  50.     if((GetSenderID() == 1) && (soundsOn == 0))
  51.     {
  52.         soundsOn = 1;
  53.         SetPulse(2.0);
  54.     }
  55.     
  56.     if(GetSenderID() == 0)
  57.     {
  58.         soundsOn = 0;
  59.         SetPulse(0.0);
  60.     }
  61.     
  62.     return;
  63.  
  64. # ========================================================================================
  65.  
  66. pulse:
  67.  
  68.     PlaySoundThing(ambient0[RandBetween(0, 5)], soundPos0[RandBetween(0, 8)], 1.0, 10, 20, 0);
  69.     return;
  70.  
  71. # ========================================================================================
  72.  
  73. end
  74.